package com.ailiwu.www.ailiwu.utils;

import android.util.Log;

import com.ailiwu.www.ailiwu.base.MyApplication;


/**
 * Author:    XiYoung
 * Version    V1.0
 * Date:      2015/12/1 19:50
 * Description:这是一个打印工具类用来打印Log进行Debug调试
 * Modification  History:
 * Date         	Author        		Version        	Description
 * -----------------------------------------------------------------------------------
 * 2015/12/1       XiYoung              1.0                   1.0
 * Why & What is modified:
 */
public class Logger {
    private static final String TAG = "Logger";

    /**
     * debug级别
     *
     * @param msg
     */
    public static void d(String msg) {
        if (MyApplication.isDebug) {
            Log.d(TAG, msg);
        }
    }

    /**
     * warning级别
     *
     * @param msg
     */
    public static void w(String msg) {
        if (MyApplication.isDebug) {
            Log.w(TAG, msg);
        }
    }

    /**
     * error级别
     *
     * @param msg
     */
    public static void e(String msg) {
        if (MyApplication.isDebug) {
            Log.e(TAG, msg);
        }
    }

    /**
     * info级别
     *
     * @param msg
     */
    public static void i(String msg) {
        if (MyApplication.isDebug) {
            Log.i(TAG, msg);
        }
    }

    /**
     * verbose级别
     *
     * @param msg
     */
    public static void v(String msg) {
        if (MyApplication.isDebug) {
            Log.v(TAG, msg);
        }
    }
}
